package com.sl.au.service;


import com.sl.au.entity.AfterSaleActive;
import com.sl.au.entity.ContractVo;
import com.sl.au.entity.MaintainItemDeviceVo;
import com.sl.au.repository.AfterSaleActiveRepository;

import java.util.List;

public interface AfterSaleActiveService extends BaseService {

    AfterSaleActiveRepository getRepository();

    /**
     * 没有查询条件时服务器分页
     * @param start
     * @param length
     * @param key
     * @param orderName
     * @param dir
     * @return
     */
    List<ContractVo> getPage(int start, int length, String key, String orderName, String dir);
    List<MaintainItemDeviceVo> getPlanPage(int start, int length, String key, String orderName, String dir);

    /**
     * 通过查询条件得到主动售后合同条数
     * @param key
     * @return
     */
    long getPageCount(String key);
    long getPlanPageCount(String key);

    List<AfterSaleActive> getAfterSaleActives(int start, int length, String key, String orderName, String dir);
    
    /*
     * 获得已维护时间超期的合同
     */
    List<ContractVo> getAllContract();
}
